package com.twu.biblioteca;

import java.util.ArrayList;

public class BookLib extends Store {

    public BookLib(ArrayList<Book> bookList) {
        super();
        for (Book b : bookList) {
            itemArrayList.add(b);
        }
    }
    public Book getById(int Id){
        return (Book)super.getByid(Id);
    }
    public ArrayList<Book> listOfBooks(){
        ArrayList<Item> items= super.getList();
        ArrayList<Book> books = new ArrayList<Book>();
        for(Item b: items){
            if(!((Book)b).isChecked())
                books.add((Book)b);
        }
        return books;
    }
}
